package com.xuexiang.xuidemo.app;

import com.xuexiang.xuidemo.app.adapter.WordListItem;

import java.util.ArrayList;
import java.util.List;

public class DataProvider {

    private static List<WordListItem> items = new ArrayList<WordListItem>(){{
        add(new WordListItem("项目1", "http://img44.photophoto.cn/20170727/0847085702814554_s.jpg", "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fhbimg.b0.upaiyun.com%2Fb1358fb0e738255eb298b40f2fc09cf9f4a58cbf19a98-mobI0Z_fw658&refer=http%3A%2F%2Fhbimg.b0.upaiyun.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1646721515&t=95304356c6cd0ff132f7df28955a04ca", "http://lmp4.vjshi.com/2017-09-13/f55a900d89679ac1c9837d5b5aaf632a.mp4"));
        add(new WordListItem("项目2", "http://img44.photophoto.cn/20170727/0847085702814554_s.jpg", "http://img44.photophoto.cn/20170727/0847085702814554_s.jpg", "http://lmp4.vjshi.com/2017-09-13/f55a900d89679ac1c9837d5b5aaf632a.mp4"));
        add(new WordListItem("项目3", "http://img44.photophoto.cn/20170727/0847085702814554_s.jpg", "http://img44.photophoto.cn/20170727/0847085702814554_s.jpg", "http://lmp4.vjshi.com/2017-09-13/f55a900d89679ac1c9837d5b5aaf632a.mp4"));
        add(new WordListItem("项目4", "http://img44.photophoto.cn/20170727/0847085702814554_s.jpg", "http://img44.photophoto.cn/20170727/0847085702814554_s.jpg", "http://lmp4.vjshi.com/2017-09-13/f55a900d89679ac1c9837d5b5aaf632a.mp4"));
        add(new WordListItem("项目5", "http://img44.photophoto.cn/20170727/0847085702814554_s.jpg", "http://img44.photophoto.cn/20170727/0847085702814554_s.jpg", "http://lmp4.vjshi.com/2017-09-13/f55a900d89679ac1c9837d5b5aaf632a.mp4"));
        add(new WordListItem("项目6", "http://img44.photophoto.cn/20170727/0847085702814554_s.jpg", "http://img44.photophoto.cn/20170727/0847085702814554_s.jpg", "http://lmp4.vjshi.com/2017-09-13/f55a900d89679ac1c9837d5b5aaf632a.mp4"));
    }};

    public static List<WordListItem> getWordItems() {
        return items;
    }

    public static WordListItem getWordItemByWord(String word) {
        for (WordListItem item : items) {
            if (item.word.equals(word)) {
                return item;
            }
        }
        return null;
    }

}
